package com.sld.integrate.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author wugangwei
 * @since 2022-04-04
 */
@Data
@TableName("rec_dev_message")
@NoArgsConstructor
public class RecDevMessage implements Serializable {

    private static final long serialVersionUID = 1L;


    public RecDevMessage(long msgId, String devId, float pressure, float rotateSpeed, float humidity, float temperature, int state,Date msgTime, Date insertTime) {
        this.msgId = msgId;
        this.devId = devId;
        this.pressure = pressure;
        this.rotateSpeed = rotateSpeed;
        this.humidity = humidity;
        this.temperature = temperature;
        this.state = state;
        this.msgTime = msgTime;
        this.insertTime = insertTime;

    }

    @TableId(type = IdType.INPUT)
    private Long msgId;

    private String devId;

    private Float pressure;

    private Float rotateSpeed;

    private Float humidity;

    private Float temperature;

    private Integer state;

    private Date insertTime;

    private Date msgTime;



    @Override
    public String toString() {
        return "RecDevMessage{" +
            "msgId=" + msgId +
            ", devId=" + devId +
            ", pressure=" + pressure +
            ", rotateSpeed=" + rotateSpeed +
            ", humidity=" + humidity +
            ", temperature=" + temperature +
            ", state=" + state +
            ", insertTime=" + insertTime +
        "}";
    }
}
